package demo3;


import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        Student[] students = new Student[3];
        students[0]= new Student("zhangsan",11);
        students[1] = new Student("lisi",12);
        students[2] = new Student("abc",13);
        System.out.println("排序前"+ Arrays.toString(students));
        NameSort namesort = new NameSort();
        Arrays.sort(students,namesort);
        System.out.println("排序后"+Arrays.toString(students));
    }
}
